On October 15, 2010 at 01:35, kanofsky said...
This is quite incredible. You are an amazing help. But a question. How did you know which codes correlate to the functions above (and you're correct - that's essentially all there is on this device? In other words, if the option is 1-255, how do you know which among them is "red 6" or "power on" ??
I had the codes already from another database. You can not know what each of the 256 possible Nec1 hex codes from
MakeHex will do unless you,
1.) Test them all.
OR
2.) Have the info from the manufacturer.
OR
3.) Have a learnt hex code that you can use with IRTools / DecodeIR (see Post 2) to identify the Protocol, Device, Sub Device and Function Number.
Separately, what means did you have to identify that this particular device was NEC1 Device 16? Is there a knowledgebase somewhere that enumerates this?
I used IRTools / DecodeIR (see post 2)
Below is an example of the results you get if you copy & paste the Power On hex code from Post 2 into the IRTools 'Hex Codes' window and the press the 'Decode Hex' button.
The info in 'DecodeIR DLL Results' is all you need for
MakeHex.
Protocol: NEC1 (use NEC1 IRP File)
Device: 16 (Device Number in Decimal)
OBC: 31 (Function Number in Decimal)
EFC: 250 (Not needed for
MakeHex)
IRTools also gives you the 'Frequency' of the learnt hex code when you close 'DecodeIR DLL Results' that can come in handy if the default Frequency in
MakeHex is set to a different value.
The Frequency of the IR code signal is generally fairly forgiving (+ or - 2KHz) for most Devices receiving it so a the default settings in the IRP files in
MakeHex rarely need to be changed but is something to consider if the generated hex codes from
MakeHex don't work. As Barry said, have a read of his doc for more info.
[Link: remotecentral.com]Finally, here's the information provided by the manufacturer to me today:
CTG P/N 40697 Hex Code (CAS-62RH)
Frequency : 38KHz
Wavelength : 940nm
18key Code List
Custom Code : 10EF
They then provided a table of values
Power On = 1FE0
Power Off = 5FA0
CH1 = 12ED and 1CE3 (I assume these are Red and Green)
and so on and so forth.....
But HOW would I know which of the 1 - 255 codes would be the right one for these particular functions?
MakeHex uses Decimal Numbers for its settings so you always need convert Hex to Decimal for the Device & Sub Device Number. You can use the Calculator in Windows OS set to Scientific Mode to do this.
Custom Code: 10EF
10 is the Device Number (10 Hex = 16 Decimal).
EF is the Sub Device Number (EF Hex = 239 Decimal).
If you add 10 and EF together you get FF (255 in Decimal)
10 + EF = FF
If the Custom Code (Device & Sub Device Number) adds up to FF you only need to use Device=16 (Decimal) in
MakeHex but if does not add up to FF you need to use a Sub Device Number as well.
I generally use the Sub Device Number as well just to avoid mistakes. So you can either use Device=16 or Device=16.239 in the NEC1 IRP file. Both will give you the same result in this case.
Power On = 1FE0
1F is the Function Number (1F Hex = 31 Decimal)
The good thing about the new
GUI for
MakeHex (see Post 2) is that you can generate the .HEX file (!Output file) in Hex Numbers easily by setting 'Output' to 'Hex' or 'Both' (no need to convert Hex to Decimal for Function Numbers) and then press 'Make Hex' button.
Open the !Output file and find the Power On =
1FE0 hex code named,
Device Code: 10.EF Function:
1F0000 006D 0022 0002 0157 00AC 0015 0016 0015 0016 0015 0016 0015 0016 0015 0041 0015 0016 0015 0016 0015 0016 0015 0041 0015 0041 0015 0041 0015 0041 0015 0016 0015 0041 0015 0041 0015 0041 0015 0041 0015 0041 0015 0041 0015 0041 0015 0041 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0041 0015 0041 0015 0041 0015 0689 0157 0056 0015 0E94
Power Off =
5FA0
Device Code: 10.EF Function:
5F0000 006D 0022 0002 0157 00AC 0015 0016 0015 0016 0015 0016 0015 0016 0015 0041 0015 0016 0015 0016 0015 0016 0015 0041 0015 0041 0015 0041 0015 0041 0015 0016 0015 0041 0015 0041 0015 0041 0015 0041 0015 0041 0015 0041 0015 0041 0015 0041 0015 0016 0015 0041 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0041 0015 0016 0015 0041 0015 0689 0157 0056 0015 0E94
Cheers
Jason
Last edited by Jasonvp on October 15, 2010 10:54.